//
//  ZLViewController.m
//  ZLListEmpty
//
//  Created by 赵振磊 on 06/11/2024.
//  Copyright (c) 2024 赵振磊. All rights reserved.
//

#import "ZLViewController.h"
#import <ZLListEmpty/ZLListEmpty.h>

@interface ZLViewController ()<UITableViewDelegate, UITableViewDataSource,
UICollectionViewDelegate, UICollectionViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *tableview;
@property (weak, nonatomic) IBOutlet UICollectionView *collectionView;

@end

@implementation ZLViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
//    [ZLListEmpty configEmptyImage:[UIImage imageNamed:@"空数据"] emptyText:@"暂无数据" offset:0];
    [self.tableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"table"];
    [self.collectionView registerClass:[UICollectionViewCell class] forCellWithReuseIdentifier:@"collection"];
}

#pragma mark - table

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 0;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"table" forIndexPath:indexPath];
    cell.textLabel.text = [NSString stringWithFormat:@"%ld", (long)indexPath.row];
    return cell;
}

#pragma mark - collection

- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return 0;
}

- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"collection" forIndexPath:indexPath];
    cell.backgroundColor = [UIColor orangeColor];
    return cell;
}


@end
